<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>map()</title>
	</head>
	<body>
		<script>
			// map() 方法返回一个新数组，新数组中的元素是原数组中每个元素调用一次提供函数后的值

			let arr = [1, 2, 3];
			let newArr = arr.map((num) => num * 2);
			console.log(newArr);
		</script>
	</body>
</html>
